//
//  DeviceDefine.h
//  AIWAYS
//
//  Created by Navinfo on 2018/6/7.
//  Copyright © 2018年 wlq. All rights reserved.
//

#ifndef DeviceDefine_h
#define DeviceDefine_h

// 手机型号
#define PHONE_MODEL [[UIDevice currentDevice] model]
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

#define iPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)

//iPhone X
#define FACEID_ENABLE ([[UIScreen mainScreen] currentMode].size.height/[[UIScreen mainScreen] currentMode].size.width > 2.0f)

#define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]
#define CurrentSystemVersion [[UIDevice currentDevice] systemVersion]

#define SIZE_SCREEN_WIDTH    [[UIScreen mainScreen] bounds].size.width
#define SIZE_SCREEN_HEIGHT   [[UIScreen mainScreen] bounds].size.height

//根据ip6的屏幕来拉伸
#define kRealValue(with) ((with)*(KScreenWidth/375.0f))
//可用来判断有刘海(height = 44),没刘海(height = 20)
#define kStatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
#define kNavBarHeight 44.0
#define kTabBarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20?83:49)
#define kTopHeight (kStatusBarHeight + kNavBarHeight)

#define BOTTOM_CONSTRAINT ([[UIScreen mainScreen] currentMode].size.height/[[UIScreen mainScreen] currentMode].size.width > 2.0f ? 34.0f:0.0f)

#endif /* DeviceDefine_h */
